how to write application to the principal